package com.example.actionbardemo.fragment;

import android.graphics.Color;
import android.graphics.LinearGradient;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;

public class BaseFragment extends Fragment{
	private String content;
	private TextView tv;
	
	public BaseFragment() {
		super();
	}

	public BaseFragment(String content){
		this.content = content;
	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		tv = new TextView(getActivity());
		LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
		params.gravity = Gravity.CENTER;
		tv.setLayoutParams(params);
		tv.setTextColor(Color.BLACK);
		tv.setTextSize(30);
		tv.setText(content);
		return tv;
	}
}
